// validatorPool.ts  白名单池
import { nameValidator, idCardValidator } from '@/validators/index';

// 白名单：后端 rule_value 只能出现这里的 key
export const validatorPool: Record<string, Function> = {
  nameValidator,   // 字符串 ↔ 函数 映射
  idCardValidator,
  // 后续再加...
};


/*
export const validatorPool: Record<string, Function> = {
  nameValidator: (_: any, v: string, cb: Function) =>
    /^[A-Za-z0-9]+$/.test(v) ? cb() : cb(new Error('只能字母数字')),
};
*/